package org.genntii.smuserserver.service.impl;

import org.genntii.smuserserver.service.CacheService;
import org.genntii.smuserserver.utils.CaptchaUtil;
import org.springframework.cache.annotation.CachePut;
import org.springframework.stereotype.Service;

@Service
public class CacheServiceImpl implements CacheService {

    @CachePut(value = "captcha", key = "#email")
    @Override
    public int captchaCache(String email) {
        return CaptchaUtil.captchaGeneration();
    }
}
